package com.example.dubbo.consumer.service.impl;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.dubbo.api.service.OrderService;
import com.example.dubbo.api.service.UserService;
import com.example.dubbo.consumer.service.ConsumerService;
import org.springframework.stereotype.Service;

/**
 * @author xyh
 * @date 2021/7/11 15:19
 */
@Service
public class ConsumerServiceImpl implements ConsumerService {

    @Reference
    private UserService userService;

    @Reference
    private OrderService orderService;

    @Override
    public Object getOrder(Long id) {
        return orderService.getOrder(id);
    }

    @Override
    public Object getUserName(Long id) {
        return userService.getUserName(id);
    }
}
